package com.zpark.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/server")
public class ServerRibbonController {

    // 从配置文件当中读取端口号
    @Value("${server.port}")
    private String port;

    @RequestMapping("/port")
    public String getPort(){
        return "这是端口号为:" + port + "的秒杀服务";
    }
}
